package com.zjc.mymq.broker.core;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author zjc
 * @date Created in 22:50 2024/6/25
 * 
 */
public class CommitLogMMapFileModelManager {

    /**
     * key:主题名称，value:文件的mMap对象
     */
    private Map<String, CommitLogMMapFileModel> mMapFileModelMap = new ConcurrentHashMap<>();

    public void put(String topic, CommitLogMMapFileModel mapFileModel) {
        mMapFileModelMap.put(topic,mapFileModel);
    }

    public CommitLogMMapFileModel get(String topic) {
        return mMapFileModelMap.get(topic);
    }

}
